﻿using System;
using System.Threading;

namespace FrameSyncServer
{
    public class TestSqlConn
    {
        static TestSqlConn _instance;
        public static TestSqlConn instance
        {
            get
            {
                if (_instance == null)
                    _instance = new TestSqlConn();

                return _instance;
            }
        }

        public void Start()
        {
            for(int i = 0; i < 2; i++)
            {
                Thread thread = new Thread(ThreadSql);
                thread.Start();
            }
        }

        void ThreadSql()
        {
             //int rowsCount = MysqlFunction.GetTableRowsCount(SqlTable.users);
            skins[] petsTable = UserServer.FindInSkinsTable(3);

            Console.WriteLine($"thread:{Environment.CurrentManagedThreadId} read petsTable:{petsTable.GetArrStr()}");
        }
    }

}


